import { http } from '@/utils/http'
// 引入ts类型
import type { userInfoType, putUserInfoParamsType } from '@/types/user'
enum API {
  GETUSERINFOAPI = '/member/profile',
}

// 获取个人信息的接口
export const getUserInfoAPI = () => {
  return http<userInfoType>({
    method: 'GET',
    url: API.GETUSERINFOAPI,
  })
}

// 修改个人信息的接口
export const putUserInfoAPI = (data: putUserInfoParamsType) => {
  return http<userInfoType>({
    method: 'PUT',
    url: API.GETUSERINFOAPI,
    data,
  })
}
